<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // var str = new String('abcdefg');
        // console.log(str);
        // console.log(str.length);
        // var str = 'abcdefg';
        // console.log(str);
        // console.log(str.length);

        // //String字符串对象 与 str 字符串变量区别
        var obj = new String('abcdef');
        console.log(typeof obj);
        console.log(obj instanceof String);
        var str = 'abcdef';
        console.log(typeof str);
        console.log(str instanceof String);
    </script>
</head>
<body>
    
</body>
</html>